Spyware is computer software that collects personal information about users without their informed consent. The term is often used interchangeably with adware and malware (software designed to infiltrate and damage a computer respectively). Personal information is secretly recorded with a variety of techniques, including logging keystrokes, recording Internet web browsing history, and scanning documents on the computer's hard disk. Purposes may range from overtly criminal (theft of passwords and financial details) to the merely annoying (recording Internet search history for targeted advertising, while consuming computer resources). Spyware may collect different types of information. Some variants attempt to track the websites a user visits and then send this information to an advertising agency. More malicious variants attempt to intercept passwords or credit card numbers as a user enters them into a web form or other applications.
The spread of spyware has led to the development of an entire anti-spyware industry. Its products remove or disable existing spyware on the computers they are installed on and prevent its installation. However, a number of companies have incorporated forms of spyware into their products. These programs are not considered malware, but are still spyware as they watch and observe for advertising purposes.
Commonly available antispyware programs typically check for known binary patterns of known spywares in a file. If the binary pattern is slightly altered such that the spyware functionality does not get affected, the antispyware tools may not be able to detect spyware programs. An example case is adding a dummy NOP instruction to the original spyware binary code. Other techniques of getting around current techniques include variable renaming, register renaming, dead code insertion, and so on.